home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / gcc / gcc270_src.lha / gcc-2.7.0-amiga / config / i386 / sequent.h < prev    next >
C/C++ Source or Header  |  1995-06-15  |  5KB  |  153 lines

  1. /* Definitions for Sequent Intel 386.
  2.    Copyright (C) 1988, 1994 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU CC.
  5.  
  6. GNU CC is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. GNU CC is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU CC; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 59 Temple Place - Suite 330,
  19. Boston, MA 02111-1307, USA.  */
  20.  
  21. #include "i386/i386.h"
  22.  
  23. /* Use the BSD assembler syntax.  */
  24.  
  25. #include "i386/bsd.h"
  26.  
  27. /* By default, don't use IEEE compatible arithmetic comparisons
  28.    because the assembler can't handle the fucom insn.
  29.    Return float values in the 387.
  30.    (TARGET_80387 | TARGET_FLOAT_RETURNS_IN_80387) */
  31.  
  32. #undef TARGET_DEFAULT
  33. #define TARGET_DEFAULT 0201
  34.  
  35. /* Specify predefined symbols in preprocessor.  */
  36.  
  37. #define CPP_PREDEFINES "-Dunix -Di386 -Dsequent -Asystem(unix) -Acpu(i386) -Amachine(i386)"
  38.  
  39. /* Pass -Z and -ZO options to the linker.  */
  40.  
  41. #define LINK_SPEC "%{Z*}"
  42.  
  43. #if 0 /* Dynix 3.1 is said to accept -L.  */
  44. /* Dynix V3.0.12 doesn't accept -L at all.  */
  45.  
  46. #define LINK_LIBGCC_SPECIAL
  47. #endif
  48.  
  49. /* Link with libg.a when debugging, for dbx's sake.  */
  50.  
  51. #define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} "
  52.  
  53. /* We don't want to output SDB debugging information.  */
  54.  
  55. #undef SDB_DEBUGGING_INFO
  56.  
  57. /* We want to output DBX debugging information.  */
  58.  
  59. #define DBX_DEBUGGING_INFO
  60.  
  61. /* Sequent Symmetry has size_t defined as int in /usr/include/sys/types.h */
  62. #define SIZE_TYPE "int"
  63.  
  64. /* gcc order is ax, dx, cx, bx, si, di, bp, sp, st, st.
  65.  * dbx order is ax, dx, cx, st(0), st(1), bx, si, di, st(2), st(3),
  66.  *         st(4), st(5), st(6), st(7), sp, bp  */
  67.  
  68. /* ??? The right thing would be to change the ordering of the
  69.    registers to correspond to the conventions of this system,
  70.    and get rid of DBX_REGISTER_NUMBER.  */
  71.  
  72. #undef DBX_REGISTER_NUMBER
  73. #define DBX_REGISTER_NUMBER(n)        \
  74. ((n) < 3 ? (n) : (n) < 6 ? (n) + 2    \
  75.  : (n) == 6 ? 15 : (n) == 7 ? 14 : 3)
  76.  
  77. /* malcolmp@hydra.maths.unsw.EDU.AU says these two definitions
  78.    fix trouble in dbx.  */
  79. #undef DBX_OUTPUT_LBRAC
  80. #define DBX_OUTPUT_LBRAC(file,name)    \
  81.           fprintf (asmfile, "%s %d,0,%d,", ASM_STABN_OP, N_LBRAC, depth); \
  82.           assemble_name (asmfile, buf); \
  83.           fprintf (asmfile, "\n");
  84.  
  85. #undef DBX_OUTPUT_RBRAC
  86. #define DBX_OUTPUT_RBRAC(file,name)    \
  87.           fprintf (asmfile, "%s %d,0,%d,", ASM_STABN_OP, N_RBRAC, depth); \
  88.           assemble_name (asmfile, buf); \
  89.           fprintf (asmfile, "\n");
  90.  
  91. /* Prevent anything from being allocated in the register pair cx/bx,
  92.    since that would confuse GDB.  */
  93.  
  94. #undef HARD_REGNO_MODE_OK
  95. #define HARD_REGNO_MODE_OK(REGNO, MODE) \
  96.   (((REGNO) < 2 ? 1                            \
  97.     : (REGNO) < 4 ? 1                            \
  98.     : FP_REGNO_P (REGNO) ? (GET_MODE_CLASS (MODE) == MODE_FLOAT         \
  99.                 || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT) \
  100.     : (MODE) != QImode)                            \
  101.    && ! (REGNO == 2 && GET_MODE_UNIT_SIZE (MODE) > 4))
  102.  
  103. /* Output assembler code to FILE to increment profiler label # LABELNO
  104.    for profiling a function entry. */
  105.  
  106. #undef FUNCTION_PROFILER
  107. #define FUNCTION_PROFILER(FILE, LABELNO)  \
  108.    fprintf (FILE, "\tmovl $.LP%d,%%eax\n\tcall mcount\n", (LABELNO));
  109.  
  110. /* Assembler pseudo-op for shared data segment. */
  111. #define SHARED_SECTION_ASM_OP ".shdata"
  112.  
  113. /* A C statement or statements which output an assembler instruction
  114.    opcode to the stdio stream STREAM.  The macro-operand PTR is a
  115.    variable of type `char *' which points to the opcode name in its
  116.    "internal" form--the form that is written in the machine description.
  117.  
  118.    The Sequent assembler (identified as "Balance 8000 Assembler
  119.    07/17/85 3.90" by "as -v") does not understand the `movs[bwl]' string
  120.    move mnemonics - it uses `smov[bwl]' instead.  Change "movs" into
  121.    "smov", carefully avoiding the sign-extend opcodes.  */
  122.  
  123. #define ASM_OUTPUT_OPCODE(STREAM, PTR)    \
  124. {                                    \
  125.   if ((PTR)[0] == 'm'                            \
  126.       && (PTR)[1] == 'o'                        \
  127.       && (PTR)[2] == 'v'                        \
  128.       && (PTR)[3] == 's'                        \
  129.       && ((PTR)[4] == 'b' || (PTR)[4] == 'w' || (PTR)[4] == 'l')    \
  130.       && ((PTR)[5] == ' ' || (PTR)[5] == '\t'|| (PTR)[5] == '\0'))    \
  131.     {                                    \
  132.       fprintf (STREAM, "smov");                        \
  133.       (PTR) += 4;                            \
  134.     }                                    \
  135. }
  136.  
  137. /* 10-Aug-92 pes  Local labels are prefixed with ".L" */
  138. #undef LPREFIX
  139. #define LPREFIX ".L"
  140.  
  141. #undef ASM_GENERATE_INTERNAL_LABEL
  142. #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER)\
  143.   sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER))
  144.  
  145. #undef ASM_OUTPUT_INTERNAL_LABEL
  146. #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)\
  147.   fprintf (FILE, ".%s%d:\n", PREFIX, NUM)
  148.  
  149. /* The native compiler passes the address of the returned structure in eax. */
  150. #undef STRUCT_VALUE
  151. #undef STRUCT_VALUE_INCOMING
  152. #define STRUCT_VALUE_REGNUM    0
  153.